Optimal. Leaf size=119 \[ -\frac {3 x}{4 a^2}-\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac {\cos (c+d x)}{a^2 d}+\frac {\cos ^3(c+d x)}{3 a^2 d}-\frac {\cos ^5(c+d x)}{5 a^2 d}-\frac {3 \cos (c+d x) \sin (c+d x)}{4 a^2 d}-\frac {\cos ^3(c+d x) \sin (c+d x)}{2 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 9, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2954, 2952,
2715, 8, 2672, 308, 212, 2645, 30} \begin {gather*} -\frac {\cos ^5(c+d x)}{5 a^2 d}+\frac {\cos ^3(c+d x)}{3 a^2 d}+\frac {\cos (c+d x)}{a^2 d}-\frac {\sin (c+d x) \cos ^3(c+d x)}{2 a^2 d}-\frac {3 \sin (c+d x) \cos (c+d x)}{4 a^2 d}-\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac {3 x}{4 a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 30
Rule 212
Rule 308
Rule 2645
Rule 2672
Rule 2715
Rule 2952
Rule 2954
Rubi steps
\begin {align*} \int \frac {\cos ^7(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac {\int \cos ^3(c+d x) \cot (c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac {\int \left (-2 a^2 \cos ^4(c+d x)+a^2 \cos ^3(c+d x) \cot (c+d x)+a^2 \cos ^4(c+d x) \sin (c+d x)\right ) \, dx}{a^4}\\ &=\frac {\int \cos ^3(c+d x) \cot (c+d x) \, dx}{a^2}+\frac {\int \cos ^4(c+d x) \sin (c+d x) \, dx}{a^2}-\frac {2 \int \cos ^4(c+d x) \, dx}{a^2}\\ &=-\frac {\cos ^3(c+d x) \sin (c+d x)}{2 a^2 d}-\frac {3 \int \cos ^2(c+d x) \, dx}{2 a^2}-\frac {\text {Subst}\left (\int x^4 \, dx,x,\cos (c+d x)\right )}{a^2 d}-\frac {\text {Subst}\left (\int \frac {x^4}{1-x^2} \, dx,x,\cos (c+d x)\right )}{a^2 d}\\ &=-\frac {\cos ^5(c+d x)}{5 a^2 d}-\frac {3 \cos (c+d x) \sin (c+d x)}{4 a^2 d}-\frac {\cos ^3(c+d x) \sin (c+d x)}{2 a^2 d}-\frac {3 \int 1 \, dx}{4 a^2}-\frac {\text {Subst}\left (\int \left (-1-x^2+\frac {1}{1-x^2}\right ) \, dx,x,\cos (c+d x)\right )}{a^2 d}\\ &=-\frac {3 x}{4 a^2}+\frac {\cos (c+d x)}{a^2 d}+\frac {\cos ^3(c+d x)}{3 a^2 d}-\frac {\cos ^5(c+d x)}{5 a^2 d}-\frac {3 \cos (c+d x) \sin (c+d x)}{4 a^2 d}-\frac {\cos ^3(c+d x) \sin (c+d x)}{2 a^2 d}-\frac {\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (c+d x)\right )}{a^2 d}\\ &=-\frac {3 x}{4 a^2}-\frac {\tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac {\cos (c+d x)}{a^2 d}+\frac {\cos ^3(c+d x)}{3 a^2 d}-\frac {\cos ^5(c+d x)}{5 a^2 d}-\frac {3 \cos (c+d x) \sin (c+d x)}{4 a^2 d}-\frac {\cos ^3(c+d x) \sin (c+d x)}{2 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.50, size = 93, normalized size = 0.78 \begin {gather*} \frac {270 \cos (c+d x)+5 \cos (3 (c+d x))-3 \left (60 c+60 d x+\cos (5 (c+d x))+80 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-80 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+40 \sin (2 (c+d x))+5 \sin (4 (c+d x))\right )}{240 a^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 152, normalized size = 1.28
method | result | size |
risch | \(-\frac {3 x}{4 a^{2}}+\frac {9 \,{\mathrm e}^{i \left (d x +c \right )}}{16 d \,a^{2}}+\frac {9 \,{\mathrm e}^{-i \left (d x +c \right )}}{16 d \,a^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a^{2} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{a^{2} d}-\frac {\cos \left (5 d x +5 c \right )}{80 d \,a^{2}}-\frac {\sin \left (4 d x +4 c \right )}{16 a^{2} d}+\frac {\cos \left (3 d x +3 c \right )}{48 d \,a^{2}}-\frac {\sin \left (2 d x +2 c \right )}{2 a^{2} d}\) | \(149\) |
derivativedivides | \(\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {4 \left (-\frac {5 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}-\frac {\left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-3 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {8 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-\frac {7 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+\frac {5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8}-\frac {17}{30}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {3 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}}{d \,a^{2}}\) | \(152\) |
default | \(\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {4 \left (-\frac {5 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}-\frac {\left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-3 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {8 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}-\frac {7 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+\frac {5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8}-\frac {17}{30}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}-\frac {3 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}}{d \,a^{2}}\) | \(152\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 333 vs.
\(2 (109) = 218\).
time = 0.51, size = 333, normalized size = 2.80 \begin {gather*} -\frac {\frac {\frac {75 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {280 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {30 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {320 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {360 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac {30 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {60 \, \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {75 \, \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} - 68}{a^{2} + \frac {5 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {10 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {10 \, a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {5 \, a^{2} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} + \frac {a^{2} \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}}} + \frac {45 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac {30 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}}{30 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 94, normalized size = 0.79 \begin {gather*} -\frac {12 \, \cos \left (d x + c\right )^{5} - 20 \, \cos \left (d x + c\right )^{3} + 45 \, d x + 15 \, {\left (2 \, \cos \left (d x + c\right )^{3} + 3 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) - 60 \, \cos \left (d x + c\right ) + 30 \, \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 30 \, \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{60 \, a^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 156, normalized size = 1.31 \begin {gather*} -\frac {\frac {45 \, {\left (d x + c\right )}}{a^{2}} - \frac {60 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac {2 \, {\left (75 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 60 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 30 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 360 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 320 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 30 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 280 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 75 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 68\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{5} a^{2}}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 10.76, size = 262, normalized size = 2.20 \begin {gather*} \frac {3\,\mathrm {atan}\left (\frac {9}{4\,\left (\frac {9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}+3\right )}-\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\frac {9\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}+3}\right )}{2\,a^2\,d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}+\frac {\frac {5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{2}+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+12\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {28\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}-\frac {5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}+\frac {34}{15}}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+5\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+10\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________